#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：    dropdown_page.py
   Author :       zyq
   CreateDate：   2024/8/1 18:14
   Remark :  下拉单选框
-------------------------------------------------
"""


import time

from guitesting.common.bash.bash_ui.page_element import PageElement, BasePage


class DropdownPage(BasePage):
    url = "http://xn--6frwj470ei1s2kl.com/demo/dropdown"

    dropdown_button = PageElement(xpath="""//*[@id="c4"]""")

    dropdown_content = PageElement(xpath="""//*[@id="c6"]""")

    def click_dropdown_button(self):
        self.get_url(self.url)
        self.dropdown_button.click_element()
        # self.dropdown_button.select_contents_menu("selenium")
        self.dropdown_content.click_element()

        time.sleep(2)
